namespace ScrumSprintMonitor.Wpf.Application
{
	#region #using Directives

	using Infrastructure;

	using Microsoft.Practices.Composite.Logging;

	#endregion

	public class Log4NetLoggerFacade : ILoggerFacade
	{
		#region Implementation of ILoggerFacade

		private static ILogger<Log4NetLoggerFacade> logger;

		public void Log(string message, Category category, Priority priority)
		{
			if (logger == null)
			{
				logger = new GenericLogger<Log4NetLoggerFacade>();
			}

			switch (category)
			{
				case Category.Debug:
					logger.Debug(message);
					break;
				case Category.Warn:
					logger.Warn(message);
					break;
				case Category.Exception:
					logger.Error(message);
					break;
				case Category.Info:
					logger.Info(message);
					break;
			}
		}

		#endregion
	}
}